package com.k2data.k2app.mapper;

import com.k2data.k2app.domain.po.RDeviceCustomer;
import com.k2data.k2app.mybatis.mapper.K2Mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
 * @author lidong9144@163.com 17-3-15.
 */
@Mapper
@Repository
public interface RDeviceCustomerMapper extends K2Mapper<RDeviceCustomer> {

    @Update("UPDATE r_device_customer SET customer_id = #{customerId} WHERE device_id = #{deviceId}")
    int updateCustomerIdByDeviceId(@Param("customerId") Long customerId, @Param("deviceId") Long deviceId);

}
